package com.gxar.quick.ar.server.base.model.protocol.editor.web;


import com.gxar.quick.ar.server.base.common.enums.protocol.ArWebEditorContentTypeEnum;
import com.gxar.quick.ar.server.base.model.protocol.common.CommonArItemBorderModel;
import lombok.Data;

/**
 * Web编辑器AR边框信息
 *
 * @author zxh
 * @version 1.0
 * @created 2024/01/02.
 */
@Data
public class WebEditorArItemBorderModel {

    private ArWebEditorContentTypeEnum type;

    private String linkUrl;

    private Double innerX;

    private Double innerY;

    private Double innerWidth;

    private Double innerHeight;

    private Double outerWidth;

    private Double outerHeight;

    public CommonArItemBorderModel toCommonModel(){
        CommonArItemBorderModel outputModel = new CommonArItemBorderModel();

        outputModel.setType(type.getName());
        outputModel.setLinkUrl(linkUrl);
        outputModel.setInnerX(innerX);
        outputModel.setInnerY(innerY);
        outputModel.setInnerWidth(innerWidth);
        outputModel.setInnerHeight(innerHeight);
        outputModel.setOuterWidth(outerWidth);
        outputModel.setOuterHeight(outerHeight);

        return outputModel;
    }
}
